package com.qczl.pme.dao.impl;

import java.util.List;

import org.hibernate.SQLQuery;
import org.springframework.stereotype.Repository;

import com.qczl.core.dao.impl.BaseDaoImpl;
import com.qczl.pme.dao.CameraDao;
import com.qczl.pme.entity.PMECamera;

/**
 * 摄像头数据访问层实现类
 * @author SongR
 *
 */
@Repository
public class CameraDaoImpl extends BaseDaoImpl<PMECamera> implements CameraDao{

	@SuppressWarnings("unchecked")
	@Override
	public List<PMECamera> getBySqlL(String sql, int start, int size) {
		SQLQuery q = this.getCurrentSession().createSQLQuery(sql);
		q.addEntity(PMECamera.class);
		return q.setFirstResult(start).setMaxResults(size).list();
	}

}
